/**
 * 
 */
package edu.hadassah.store.order;

import edu.hadassah.store.uniqueid.IUniqueId;

/**
 * @author persikov
 *
 */
public class OrderInfoImpl implements IOrderInfo {

	protected IUniqueId clientId;
	protected int itemQuantity;
	protected String itemName;

	/**
	 * Copy Constructor
	 *
	 * @param orderInfoImpl a <code>OrderInfoImpl</code> object
	 */
	public OrderInfoImpl(IOrderInfo orderInfo) 
	{
		this.itemQuantity = orderInfo.getItemsQuantity();
		this.itemName = orderInfo.getItemName();
		this.clientId = orderInfo.getClientId();
	}

	public OrderInfoImpl(IUniqueId clientId, String itemName, int itemQuantity) {
		this.clientId = clientId;
		this.itemName = itemName;
		this.itemQuantity = itemQuantity;
	}

	/**
	 * @return
	 * @see edu.hadassah.store.order.IOrder#getClientId()
	 */
	public IUniqueId getClientId() {
		return clientId;
	}

	/**
	 * @return
	 * @see edu.hadassah.store.order.IOrder#getItemsQuantity()
	 */
	public int getItemsQuantity() {
		return itemQuantity;
	}

	/**
	 * @return
	 * @see edu.hadassah.store.order.IOrder#getItemName()
	 */
	public String getItemName() {
		return itemName;
	}

	/**
	 * Constructs a <code>String</code> with all attributes in name = value format.
	 *
	 * @return a <code>String</code> representation of this object.
	 */
	@Override
	public String toString()
	{
	    final String TAB = "    ";
	    
	    String retValue = "";
	    
	    retValue = "OrderInfoImpl ( "
	        + "clientId = " + this.clientId + TAB
	        + "itemQuantity = " + this.itemQuantity + TAB
	        + "itemName = " + this.itemName + TAB
	        + " )";
	
	    return retValue;
	}

}